﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ActionToAttemptToUpdateTheSameProperty.cs" company="Collaboris Ltd.">
//   Copyright (c) Collaboris Ltd. All rights Reserved.
// </copyright>
// <summary>
//   Defines the SimpleActionNoException type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Collaboris.Saf.Tests.Support.Actions
{
    using Engine;
    using Entities;

    public class ActionToAttemptToUpdateTheSameProperty : ActionBase<StringList>
    {
        protected override ProcessStatus DoAction(SafContext context, StringList entity)
        {
            context.ActionProperties.Add("Property1", "A Value", true);

            // this 2nd one wont be allowed as you can only Add / or update a place holder once only.
            context.ActionProperties.Add("Property1", "Another Value", false);
            
            return ProcessStatus.Success;
        }
    }
}